import request from '@/config/axios'

/**
 * 获取地区
 * */
export const getWebSite = (params: {
  domain: string;
}) => {
  return request.get({
    url: '/app-api/website/web-site/get-by-domain', params
  })
}
/**
 * 获取地区
 * */
export const getWebNav = (params: {
  webSiteId: string;
}) => {
  return request.get({
    url: '/app-api/website/web-navigation/list', params
  })
}

/**
 * 获取地区
 * */
export const getWebSiteProduct = (params: {
  webNavId: string;
  pageNo:number;
  pageSize:number
}) => {
  return request.get({
    url: '/app-api/website/web-navigation/product-page', params
  })
}

/**
 * 通过类别获取商品
 * */
export const getWebSiteProductByCategory = (params) => {
  return request.get({
    url: '/app-api/product/product/getProductByCategory',params:params
  })
}



/**
 * 获取地区
 * */
export const getWebSiteCategory = (params) => {
  return request.post({
    url: '/app-api/product/category/listByIds', data:params
  })
}



// 获取政策
export const getPolicyByAreaId = (params: {
  areaId: string;
}) => {
  return request.get({
    url: '/app-api/website/web-service-policy/list-by-area', params
  })
}

